package test5;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.Scanner;

public class Client {
	 public static void main(String[] args)
	   {
	      try
	      {
	         Socket s = new Socket("192.168.191.1", 8190);
	         try
	         {
	            OutputStream outStream = s.getOutputStream();
	            InputStream inStream = s.getInputStream();
	            Scanner in = new Scanner(inStream);         
	            PrintWriter out = new PrintWriter(outStream, true);
	            out.println("http://cec.jmu.edu.cn/info/1007/4975.htm");
	            while (in.hasNextLine())
	            {
	               String line = in.nextLine();
	               System.out.println(line);
	            }
	         }
	         finally
	         {
	            s.close();
	         }
	      }
	      catch (IOException e)
	      {
	         e.printStackTrace();
	      }
	   }
}
